﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020000EF RID: 239
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class BattleBuff : IMessage<BattleBuff>, IMessage, IEquatable<BattleBuff>, IDeepCloneable<BattleBuff>, IBufferMessage
	{
		// Token: 0x17000336 RID: 822
		// (get) Token: 0x06000AFC RID: 2812 RVA: 0x000209B4 File Offset: 0x0001EBB4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<BattleBuff> Parser
		{
			get
			{
				return BattleBuff._parser;
			}
		}

		// Token: 0x17000337 RID: 823
		// (get) Token: 0x06000AFD RID: 2813 RVA: 0x000209BB File Offset: 0x0001EBBB
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return BattleBuffReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17000338 RID: 824
		// (get) Token: 0x06000AFE RID: 2814 RVA: 0x000209CD File Offset: 0x0001EBCD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return BattleBuff.Descriptor;
			}
		}

		// Token: 0x06000AFF RID: 2815 RVA: 0x000209D4 File Offset: 0x0001EBD4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleBuff()
		{
		}

		// Token: 0x06000B00 RID: 2816 RVA: 0x000209F4 File Offset: 0x0001EBF4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleBuff(BattleBuff other) : this()
		{
			this.id_ = other.id_;
			this.level_ = other.level_;
			this.ownerIndex_ = other.ownerIndex_;
			this.waveFlag_ = other.waveFlag_;
			this.targetIndexList_ = other.targetIndexList_.Clone();
			this.dynamicValues_ = other.dynamicValues_.Clone();
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06000B01 RID: 2817 RVA: 0x00020A6A File Offset: 0x0001EC6A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleBuff Clone()
		{
			return new BattleBuff(this);
		}

		// Token: 0x17000339 RID: 825
		// (get) Token: 0x06000B02 RID: 2818 RVA: 0x00020A72 File Offset: 0x0001EC72
		// (set) Token: 0x06000B03 RID: 2819 RVA: 0x00020A7A File Offset: 0x0001EC7A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Id
		{
			get
			{
				return this.id_;
			}
			set
			{
				this.id_ = value;
			}
		}

		// Token: 0x1700033A RID: 826
		// (get) Token: 0x06000B04 RID: 2820 RVA: 0x00020A83 File Offset: 0x0001EC83
		// (set) Token: 0x06000B05 RID: 2821 RVA: 0x00020A8B File Offset: 0x0001EC8B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x1700033B RID: 827
		// (get) Token: 0x06000B06 RID: 2822 RVA: 0x00020A94 File Offset: 0x0001EC94
		// (set) Token: 0x06000B07 RID: 2823 RVA: 0x00020A9C File Offset: 0x0001EC9C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint OwnerIndex
		{
			get
			{
				return this.ownerIndex_;
			}
			set
			{
				this.ownerIndex_ = value;
			}
		}

		// Token: 0x1700033C RID: 828
		// (get) Token: 0x06000B08 RID: 2824 RVA: 0x00020AA5 File Offset: 0x0001ECA5
		// (set) Token: 0x06000B09 RID: 2825 RVA: 0x00020AAD File Offset: 0x0001ECAD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint WaveFlag
		{
			get
			{
				return this.waveFlag_;
			}
			set
			{
				this.waveFlag_ = value;
			}
		}

		// Token: 0x1700033D RID: 829
		// (get) Token: 0x06000B0A RID: 2826 RVA: 0x00020AB6 File Offset: 0x0001ECB6
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<uint> TargetIndexList
		{
			get
			{
				return this.targetIndexList_;
			}
		}

		// Token: 0x1700033E RID: 830
		// (get) Token: 0x06000B0B RID: 2827 RVA: 0x00020ABE File Offset: 0x0001ECBE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MapField<string, float> DynamicValues
		{
			get
			{
				return this.dynamicValues_;
			}
		}

		// Token: 0x06000B0C RID: 2828 RVA: 0x00020AC6 File Offset: 0x0001ECC6
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as BattleBuff);
		}

		// Token: 0x06000B0D RID: 2829 RVA: 0x00020AD4 File Offset: 0x0001ECD4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(BattleBuff other)
		{
			return other != null && (other == this || (this.Id == other.Id && this.Level == other.Level && this.OwnerIndex == other.OwnerIndex && this.WaveFlag == other.WaveFlag && this.targetIndexList_.Equals(other.targetIndexList_) && this.DynamicValues.Equals(other.DynamicValues) && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06000B0E RID: 2830 RVA: 0x00020B68 File Offset: 0x0001ED68
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Id != 0U)
			{
				num ^= this.Id.GetHashCode();
			}
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			if (this.OwnerIndex != 0U)
			{
				num ^= this.OwnerIndex.GetHashCode();
			}
			if (this.WaveFlag != 0U)
			{
				num ^= this.WaveFlag.GetHashCode();
			}
			num ^= this.targetIndexList_.GetHashCode();
			num ^= this.DynamicValues.GetHashCode();
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06000B0F RID: 2831 RVA: 0x00020C0E File Offset: 0x0001EE0E
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06000B10 RID: 2832 RVA: 0x00020C16 File Offset: 0x0001EE16
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06000B11 RID: 2833 RVA: 0x00020C20 File Offset: 0x0001EE20
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Id != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.Id);
			}
			if (this.Level != 0U)
			{
				output.WriteRawTag(16);
				output.WriteUInt32(this.Level);
			}
			if (this.OwnerIndex != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.OwnerIndex);
			}
			if (this.WaveFlag != 0U)
			{
				output.WriteRawTag(32);
				output.WriteUInt32(this.WaveFlag);
			}
			this.targetIndexList_.WriteTo(ref output, BattleBuff._repeated_targetIndexList_codec);
			this.dynamicValues_.WriteTo(ref output, BattleBuff._map_dynamicValues_codec);
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06000B12 RID: 2834 RVA: 0x00020CD4 File Offset: 0x0001EED4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Id != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id);
			}
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			if (this.OwnerIndex != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.OwnerIndex);
			}
			if (this.WaveFlag != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.WaveFlag);
			}
			num += this.targetIndexList_.CalculateSize(BattleBuff._repeated_targetIndexList_codec);
			num += this.dynamicValues_.CalculateSize(BattleBuff._map_dynamicValues_codec);
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06000B13 RID: 2835 RVA: 0x00020D80 File Offset: 0x0001EF80
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(BattleBuff other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Id != 0U)
			{
				this.Id = other.Id;
			}
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			if (other.OwnerIndex != 0U)
			{
				this.OwnerIndex = other.OwnerIndex;
			}
			if (other.WaveFlag != 0U)
			{
				this.WaveFlag = other.WaveFlag;
			}
			this.targetIndexList_.Add(other.targetIndexList_);
			this.dynamicValues_.MergeFrom(other.dynamicValues_);
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06000B14 RID: 2836 RVA: 0x00020E1A File Offset: 0x0001F01A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06000B15 RID: 2837 RVA: 0x00020E24 File Offset: 0x0001F024
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num > 24U)
				{
					if (num <= 40U)
					{
						if (num == 32U)
						{
							this.WaveFlag = input.ReadUInt32();
							continue;
						}
						if (num != 40U)
						{
							goto IL_35;
						}
					}
					else if (num != 42U)
					{
						if (num != 50U)
						{
							goto IL_35;
						}
						this.dynamicValues_.AddEntriesFrom(ref input, BattleBuff._map_dynamicValues_codec);
						continue;
					}
					this.targetIndexList_.AddEntriesFrom(ref input, BattleBuff._repeated_targetIndexList_codec);
					continue;
				}
				if (num == 8U)
				{
					this.Id = input.ReadUInt32();
					continue;
				}
				if (num == 16U)
				{
					this.Level = input.ReadUInt32();
					continue;
				}
				if (num == 24U)
				{
					this.OwnerIndex = input.ReadUInt32();
					continue;
				}
				IL_35:
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x04000476 RID: 1142
		private static readonly MessageParser<BattleBuff> _parser = new MessageParser<BattleBuff>(() => new BattleBuff());

		// Token: 0x04000477 RID: 1143
		private UnknownFieldSet _unknownFields;

		// Token: 0x04000478 RID: 1144
		public const int IdFieldNumber = 1;

		// Token: 0x04000479 RID: 1145
		private uint id_;

		// Token: 0x0400047A RID: 1146
		public const int LevelFieldNumber = 2;

		// Token: 0x0400047B RID: 1147
		private uint level_;

		// Token: 0x0400047C RID: 1148
		public const int OwnerIndexFieldNumber = 3;

		// Token: 0x0400047D RID: 1149
		private uint ownerIndex_;

		// Token: 0x0400047E RID: 1150
		public const int WaveFlagFieldNumber = 4;

		// Token: 0x0400047F RID: 1151
		private uint waveFlag_;

		// Token: 0x04000480 RID: 1152
		public const int TargetIndexListFieldNumber = 5;

		// Token: 0x04000481 RID: 1153
		private static readonly FieldCodec<uint> _repeated_targetIndexList_codec = FieldCodec.ForUInt32(42U);

		// Token: 0x04000482 RID: 1154
		private readonly RepeatedField<uint> targetIndexList_ = new RepeatedField<uint>();

		// Token: 0x04000483 RID: 1155
		public const int DynamicValuesFieldNumber = 6;

		// Token: 0x04000484 RID: 1156
		private static readonly MapField<string, float>.Codec _map_dynamicValues_codec = new MapField<string, float>.Codec(FieldCodec.ForString(10U, ""), FieldCodec.ForFloat(21U, 0f), 50U);

		// Token: 0x04000485 RID: 1157
		private readonly MapField<string, float> dynamicValues_ = new MapField<string, float>();
	}
}
